package Class_03_22;

import java.util.Scanner;

public class ATMTest {
    public static void main(String[] args) {
        ATM ba = new ATM(123456,500);
        System.out.println(ba.getId() + "  " + ba.getBalance());
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入要存储的钱");
        int saves = sc.nextInt();
        ba.save(saves);
        System.out.println(ba.getId() + "  " + ba.getBalance());
        System.out.println("请输入要取出的钱");
        int costs = sc.nextInt();
        ba.cost(costs);
        System.out.println(ba.getId() + "  " + ba.getBalance());
    }
}
